import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  // 这是月嫂详情页的路由
  {
    path: '/',
    component: () => import('@/views/Layout'),
    redirect: '/my',
    children: [
      {
        path: '/my',
        name: 'my',
        component: () => import('@/views/my')
      },
      {
        path: '/service',
        name: 'service',
        component: () => import('@/views/service')
      },
      {
        path: '/Housekeeping-details',
        name: 'Housekeeping-details',
        component: () => import('@/views/Housekeeping-details')
      },
      {
        path: '/homepage',
        name: 'homepage',
        component: () => import('@/views/homepage')
      },
      {
        path: '/DomesticRecord',
        name: 'DomesticRecord',
        component: () => import('@/views/Domestic-record')
      },
      // 家政公司智能匹配
      {
        path: '/homehelp',
        name: 'homehelp',
        component: () => import('@/views/home/components/HomeServerCompany/homeHelp.vue')
      }
      // {
      //   path: '/housekeeping',
      //   name: 'housekeeping',
      //   component: () => import('@/views/home/components/housekeeping')
      // },
      // {
      //   path: '/homeservercompany',
      //   name: 'homeservercompany',
      //   component: () => import('@/views/home/components/HomeServerCompany')
      // },
      // {
      //   path: '/job',
      //   name: 'job',
      //   component: () => import('@/views/job')
      // },
      // {
      //   path: '/aboutus',
      //   name: 'aboutus',
      //   component: () => import('@/views/aboutus')
      // },
      // {
      //   path: '/relation',
      //   name: 'relation',
      //   component: () => import('@/views/relation')
      // },
      // {
      //   path: '/herdetails',
      //   name: 'herdetails',
      //   component: () => import('@/views/home/components/herdetails')
      // },
      // {
      //   path: '/domesticservice',
      //   name: 'domesticservice',
      //   component: () => import('@/views/home/components/domesticservice')
      // },
      // {
      //   path: '/authentication',
      //   name: 'authentication',
      //   component: () => import('@/views/my/components/authentication')
      // }
    ]
  },
  {
    path: '/job',
    name: 'job',
    component: () => import('@/views/job')
  },
  {
    path: '/SettingBusiness',
    name: 'SettingBusiness',
    component: () => import('@/views/setting-business')
  },
  {
    path: '/housekeeping',
    name: 'housekeeping',
    component: () => import('@/views/home/components/housekeeping')
  },
  // 家政人员介绍
  {
    path: '/herdetails/:id',
    name: 'herdetails',
    component: () => import('@/views/home/components/herdetails')
  },
  {
    path: '/herdetails',
    name: 'herdetails',
    component: () => import('@/views/home/components/herdetails')
  },
  // 个人资料
  {
    path: '/UserInformation',
    name: 'UserInformation',
    component: () => import('@/views/user-information')
  },
  // 我的关注 路由过
  {
    path: '/AttentionPersonnel',
    name: 'AttentionPersonnel',
    component: () => import('@/views/Attention-personnel')
  },
  // 关于我们
  {
    path: '/aboutus',
    name: 'aboutus',
    component: () => import('@/views/aboutus')
  },
  // 家政服务记录
  {
    path: '/relation',
    name: 'relation',
    component: () => import('@/views/relation')
  },
  // 家政服务标准
  {
    path: '/domesticservice',
    name: 'domesticservice',
    component: () => import('@/views/home/components/domesticservice')
  },
  // 找家政服务协议
  {
    path: '/authentication',
    name: 'authentication',
    component: () => import('@/views/my/components/authentication')
  },
  // 管理员身份
  {
    path: '/identity',
    name: 'identity',
    component: () => import('@/views/home/components/identity/identity.vue')
  },
  {
    // 快速登录路由
    path: '/RapidEnrollment',
    name: 'RapidEnrollment',
    component: () => import('@/views/Rapid-Enrollment')
  },
  {
    // 快速注册路由
    path: '/QuickRegistration',
    name: 'QuickRegistration',
    component: () => import('@/views/Quick-registration')
  },
  {
    path: '/employment',
    name: 'employment',
    component: () => import('@/views/employment')
  },
  {
    path: '/administrator',
    name: 'administrator',
    component: () => import('@/views/my/components/administrator/index')
  },
  // {
  //   path: '/homehelp',
  //   name: 'homehelp',
  //   component: () => import('@/views/home/components/HomeServerCompany/homeHelp.vue')
  // },
]

const router = new VueRouter({
  routes
})

export default router
